package pers.amos.edu.mapper;

import org.apache.ibatis.annotations.Select;
import pers.amos.edu.pojo.ExaminationQuestionsEntity;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * @author amos wong
 * @create 2020-04-12 8:28
 */

public interface ExaminationQuestionsMapper extends Mapper<ExaminationQuestionsEntity> {
    @Select("SELECT * FROM examination_questions WHERE paper_id = #{paperId}")
    List<ExaminationQuestionsEntity> getExaminationQuestionsList(int paperId);

    @Select("SELECT * FROM examination_questions WHERE paper_id = (SELECT paper_id FROM examination_questions WHERE id = #{questionId})")
    List<ExaminationQuestionsEntity> getExaminationQuestionsListByQuestionId(int questionId);


}
